import request from '../utils/request'

export function getAllUsers() {
  return request({
    url: '/api/user/getAllUsers',
    method: 'get'
  })
}

export function addUser(data) {
  return request({
    url: '/api/user/addUser',
    method: 'post',
    data
  })
}

export function updateUser(data) {
  return request({
    url: '/api/user/updateUser',
    method: 'post',
    data
  })
}

export function deleteUser(id) {
  return request({
    url: '/api/user/deluser',
    method: 'post',
    data: { id }
  })
}